import http from '../index'

export const getDramas = (url,data) => {
    return http({
        url: url,
        method: 'POST',
        data
    })
}

export const getDramaDetail = (params)=>{
    return http({
        url: `/api/video_drama/detail/${params.vid}`,
        method: 'GET',
        params
    })
}

export const collect = (data)=>{
    return http({
        url: `/api/user/video_drama/collect/collect/${data.vid}`,
        method: 'POST',
        data
    })
}
export const unCollect = (data)=>{
    return http({
        url: `/api/user/video_drama/collect/un_collect/${data.vid}`,
        method: 'POST',
        data
    })
}
// 短剧分类
export const getDramaCategories = (params)=>{
    return http({
        url: `/api/video_drama/categories`,
        method: 'GET',
        params
    })
}
// 浏览
export const viewDrama = (data)=>{
    return http({
        url: `/api/user/video_drama/view/${data.vid}`,
        method: 'POST',
        data
    })
}
// 创建任务
export const createTask = (data)=>{
    return http({
        url: `/api/promotion/task/create_task`,
        method: 'POST',
        data
    })
}